<?php

require_once 'Classes/OptionalFieldsElement.php';
require_once 'Classes/Model/ArticleModel.php';

class Article extends OptionalFieldsElement{
        
        private $name;
        private $barcode;
        private $description;
        private $statut;
        private $subFamilyID;
        private $structureID;
        private $loanID;
        
        
        public function __construct($arrayOrId="",$name="",$barcode="",$description="",$statut="",
                                    $subFamilyId="",$loanID="",$structureId="",$optional_1="",$optional_2="",
                                $optional_3="",$optional_4="",$optional_5="",$optional_6="") {
            
          
            
            parent::__construct($arrayOrId,$name="",$optional_1="",$optional_2="",
                                $optional_3="",$optional_4="",$optional_5="",$optional_6="");
            
            if(is_array($arrayOrId)){    
               
                $this->name = $arrayOrId['Name'];
                $this->barcode = $arrayOrId['BarCode'];
                $this->description = $arrayOrId['Description'];
                $this->statut = $arrayOrId['Statut'];
                $this->subFamilyID = $arrayOrId['Sub_FamilyID'];
                $this->structureID = $arrayOrId['StructureID'];
                $this->loanID = $arrayOrId['LoanID'];
            } else {
                
                $this->name = $name;
                $this->barcode = $barcode;
                $this->description = $description;
                $this->statut = $statut;
                $this->subFamilyID = $subFamilyId;
                $this->structureID = $structureId;
                $this->loanID = $loanID;
            }

        }
        
        
        public function getBarcode() {
             return $this->barcode;
        }

        public function setBarcode($barcode) {
            $this->barcode = $barcode;
        }
     
        public function getName() {
            return $this->name;
        }

        public function setName($name) {
            $this->name = $name;
        }

        public function getDescription() {
            return $this->description;
        }

        public function setDescription($description) {
            $this->description = $description;
        }

        public function getStatut() {
            return $this->statut;
        }

        public function setStatut($statut) {
            $this->statut = $statut;
        }

        public function getSubFamilyID() {
            return $this->subFamilyID;
        }

        public function setSubFamilyID($subFamilyID) {
            $this->subFamilyID = $subFamilyID;
        }

        public function getStructureID() {
            return $this->structureID;
        }

        public function setStructureID($structureID) {
            $this->structureID = $structureID;
        }

      
        
        public function getLoanID(){
            return $this->loanID;
        }
        
        public function setLoanID($id){
            $this->loanID = $id;
        }
}

?>